﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" CodeFile="EditTrainReview.aspx.cs" Inherits="Manage_EditTrainReview" %>
<%@ Register Src="~/Manage/CmsMessageBox.ascx" TagName="MessageBox" TagPrefix="cms" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#Comment').width($('#Body table.Info').width());
            
             $('#<%=Save.ClientID %>').click(function () {
                var ds = [
                    { 'Controller': '#<%=ArticleTitle.ClientID %>',
                        'Type': 'R', 'Clear': true, 'Focus': true,
                        'ErrorMessage': '请输入标题。'
                    },
                    { 'Controller': '#<%=ArticleKeywords.ClientID %>',
                        'Type': 'R', 'Clear': true, 'Focus': true,
                        'ErrorMessage': '请输入关键字。'
                    },
                    { 'Count': $('#<%=ArticleTemplates.ClientID %>').children().children().children().children(':radio:checked').size(),
                        'Type': 'C', 'ErrorMessage': '请选择静态化时所使用的模版。'
                    }
                     ];

                return Cms_ValidateForm(ds);
            });            
        });
    </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="body" Runat="Server">
    <cms:MessageBox ID="MessageBox" runat="server" />
    <asp:HiddenField ID="ArticleID" runat="server" />
    <asp:HiddenField ID="TrainID" runat="server" />
    <table class="Info" cellspacing="1">
        <tr>
            <td align="right" style="width: 100px">标题：</td>
            <td><asp:TextBox ID="ArticleTitle" runat="server" Width="500px"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right">子标题：</td>
            <td><asp:TextBox ID="ArticleSubtitle" runat="server" Width="500px"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right">关键字：</td>
            <td><asp:TextBox ID="ArticleKeywords" runat="server" Width="500px"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right">内容：</td>
            <td>
                <CKEditor:CKEditorControl ID="ArticleBody" runat="server" Height="400px" Skin="v2"></CKEditor:CKEditorControl>
            </td>
        </tr>
        <tr style="display: none;">
            <td align="right">静态模版：</td>
            <td align="left">
                <asp:RadioButtonList ID="ArticleTemplates" runat="server" RepeatDirection="Horizontal" RepeatColumns="4" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="Save" runat="server" Text="保存" 
                    onclick="Save_Click"/>
                    <asp:Button ID="VerifyArticle" runat="server" Text="通过审核" 
                    onclick="VerifyArticle_Click" Visible="False" />
            </td>
        </tr>
    </table>

    <div id="Comment">
        <p>注：上传图片时，请保证图片高度宽度比为4:3，文件大小不超过1MB。</p>
    </div>
</asp:Content>